package com.chen.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author chen
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("comment")
@ApiModel(value = "评论")
@SuppressWarnings("all")
public class Comment {

    @TableId(type = IdType.AUTO)
    private Integer id;    //主键id

    private String avatar; //评论头像
    private Date date;  //评论时间
    private String content;   //评论内容
    private int userId;  //评论父id
    private int count; //评论数
    private String nickname;  //评论人

    private String username;

    @TableField(exist = false)
    private int commentCount;

}
